package com.pig4cloud.pig.admin.controller;

import com.pig4cloud.pig.common.log.annotation.SysLog;
import com.pig4cloud.pig.common.security.annotation.Inner;
import com.pig4cloud.pig.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/wuliu")
@RequiredArgsConstructor
@ConditionalOnProperty(name = "wuliu.test", matchIfMissing = true)
public class WuLiuController {

	@Inner(value = false)
	@SysLog("注册ce用户")
	@GetMapping("/test")
	public ModelAndView test() {
		ModelAndView ms = new ModelAndView();
		System.out.print("===============");
		ms.setViewName("/daping/wuliu/index");
		// 获取用户
		SecurityUtils.getUser();
		return ms;
	}

}
